package com.jj.lib;

import android.view.View;
import android.widget.Button;

import com.github.gcacace.signaturepad.views.SignaturePad;
import com.jj.base.BaseActivity;
import com.jj.util.AndroidBug5497Workaround;

/**
 * Created by qmsoft05 on 2017/3/13.
 */

public class EActivity extends BaseActivity {
    private Button btn;
    @Override
    protected int getLayoutResource() {
        return R.layout.activity_e;
    }

    @Override
    protected boolean isToolBarBack() {
        return false;
    }

    @Override
    protected void initView() {
        addViewToolbar(R.layout.title_e);
        int _topStatusHeight = getStatusBarHeight();
        AndroidBug5497Workaround.assistActivity(this, _topStatusHeight);
    }

    @Override
    protected void initData() {
        setSwipeBackEnable(false);
        btn = (Button) findViewById(R.id.btn);
        final SignaturePad lpv = (SignaturePad) findViewById(R.id.signature_pad);
        lpv.setMaxWidth(10f);
        lpv.setMinWidth(0.4f);
        lpv.setVelocityFilterWeight(0.56f);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                lpv.clear();
            }
        });
    }
}
